<template>
	<view class="main-box">
		<Header :showBack="false" title="客服" bgColor="#ace8f6"></Header>
		<view class="code-box">
			<image show-menu-by-longpress="true" src="@/static/qrCode.jpg" mode=""></image>
			<text>长按保存二维码,扫码添加客服</text>
			<text @click="toPhone()" @longpress="toPhone()" style="margin-top: 20rpx;" >客服电话：{{phone}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				phone: "13787000039"
			};
		},
		methods: {
			saveImg(){
				uni.saveImageToPhotosAlbum({
					filePath: "/static/qrCode.jpg",
					success: () => {
						uni.showToast({
							icon: "none",
							title: "保存成功"
						})
					},
					fail: (e) =>{
						uni.showToast({
							icon: "none",
							title: "保存失败" + JSON.stringify(e)
						})
					}
				})
			},
			toPhone(){
				uni.makePhoneCall({
					phoneNumber: this.phone
				})
			}
		}
	}
</script>

<style lang="scss" scoped >
	.main-box{
	}
	.code-box {
		margin-top: 80rpx;
		width: 750rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		image {
			width: 400rpx;
			height: 400rpx;
			
		}
		
		text {
			font-size: 26rpx;
			margin-top: 10rpx;
		}
	}
</style>
